package java07;

import java.io.File;
import java.io.FilenameFilter;

public class zy01 {
	public static void main(String[] args){
		File f1=new File("d://");
		File[] a=f1.listFiles(new FilenameFilter(){
			public boolean accept(File f1,String name){
				File src=new File(f1,name);
				return src.isFile()&& name.endsWith(".txt");
				
			}
		});
		for (File file : a) {
			System.out.println(file);
		}
	}
}
